package com.yunfeisoft.business.service.impl;

import com.applet.base.BaseServiceImpl;
import com.applet.sql.separation.DataSourceChange;
import com.applet.utils.Page;
import com.yunfeisoft.business.dao.inter.CmsSubjectProductRelationDao;
import com.yunfeisoft.business.model.CmsSubjectProductRelation;
import com.yunfeisoft.business.service.inter.CmsSubjectProductRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * ClassName: CmsSubjectProductRelationServiceImpl
 * Description: 专题商品关系表service实现
 * Author: Jackie liu
 * Date: 2020-06-02
 */
@Service("cmsSubjectProductRelationService")
public class CmsSubjectProductRelationServiceImpl extends BaseServiceImpl<CmsSubjectProductRelation, String, CmsSubjectProductRelationDao> implements CmsSubjectProductRelationService {

    @Override
    @DataSourceChange(slave = true)
    public Page<CmsSubjectProductRelation> queryPage(Map<String, Object> params) {
        return getDao().queryPage(params);
    }

    @Override
    public List<CmsSubjectProductRelation> queryBySubjectId(String subjectId) {
        return getDao().queryBySubjectId(subjectId);
    }

    @Override
    public int removeBySubjectId(String subjectId) {
        return getDao().removeBySubjectId(subjectId);
    }

}